import { http } from "@/utils/http.js";

// 地址列表
export const addressListApi = (data) => {
  return http.request({
    method: "GET",
    url: "user/addressList",
    data:data
  });
};

// 地区列表
export const areaListApi = (data) => {
  return http.request({
    method: "GET",
    url: "user/areaList",
    data:data
  });
};

// 添加/编辑地址
export const addressCreateApi = (data) => {
  return http.request({
    method: "POST",
    url: "user/addressCreate",
    data:data
  });
};

// 地址详情
export const addressDetailApi = (data) => {
  return http.request({
    method: "GET",
    url: "user/addressDetail",
    data:data
  });
};

// 地址删除
export const addressDelApi = (data) => {
  return http.request({
    method: "POST",
    url: "user/addressDel",
    data:data
  });
};

// 设置默认
export const addressDefaultApi = (data) => {
  return http.request({
    method: "POST",
    url: "user/addressDefault",
    data:data
  });
};

